using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CollegeShop.Infrastructure.Entities.Repository;

namespace CollegeShop.Infrastructure.Entities.Entity
{
    public class Roleauthority : IAccessible<T_Roleauthority, Roleauthority>, ILogicEntity<T_Roleauthority, Roleauthority>
    {
        public int ID { get; set; }

        public int RoleID { get; set; }

        public int AuthorityID { get; set; }

        protected override void Covariant(T_Roleauthority model)
        {
            if (model != null)
            {
                    this.ID = model.ID;
                    this.RoleID = model.RoleID;
                    this.AuthorityID = model.AuthorityID;
            }
}
        protected override T_Roleauthority Inverter(Roleauthority model)
        {
            if (model != null)
            {
                return new T_Roleauthority()
                {
                    ID = model.ID,
                    RoleID = model.RoleID,
                    AuthorityID = model.AuthorityID,
                };
            }
            return null;
        }
        public Roleauthority Set(T_Roleauthority dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
